<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>template的写法</title>
    <script src="../assets/js/vue.js"></script>
</head>
<body>
    
    <div id="app">
        <template id="demo2">
            <h2 style="color:red">我是template标签模板</h2>
        </template>
    </div>

    <script>
        var app = new Vue({
            el:'#app',
            data:{
                message:'hello world!!!!'
            },
            //第一种，直接写在构造器的选项里
            //template:`<div style="color: blueviolet;">I am first.</div>`,
            //第二种，类似css选择器的写法
            template:'#demo2'
        })

    </script>
</body>
</html>